//MongoDB 数据模型
import mongoose, { Schema, Document } from 'mongoose';

export interface IEnterprise extends Document {
  name: string;
  details: string;
  status: string;
  riskLevel: number;
  serverCount: number;
  activeServers: number;
  expiredServers: number;
}

const EnterpriseSchema: Schema = new Schema({
  name: { type: String, required: true },
  details: { type: String, required: true },
  status: { type: String, required: true },
  riskLevel: { type: Number, required: true },
  serverCount: { type: Number, required: true },
  activeServers: { type: Number, required: true },
  expiredServers: { type: Number, required: true },
});

export default mongoose.model<IEnterprise>('Enterprise', EnterpriseSchema);